//
//  ADLbsSearchManager.h
//  ADUserPro
//
//  Created by AnDa-Y on 2020/8/3.
//  Copyright © 2020 AnDa-Y. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CLLocation.h>
#import "ADLocationModel.h"

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, ADRouteSearchType) {
    ADRouteSearchTypeDrive,
    ADRouteSearchTypeWalk,
    ADRouteSearchTypeRide
};

typedef void(^ADReGeoSearchResultBlock)(ADLocationModel * _Nullable locationModel, NSError * _Nullable error);
typedef void(^ADLocationSearchResultBlock)(NSArray<ADLocationModel *> * _Nullable locations, NSError * _Nullable error);
typedef void(^ADRouteSearchResultBlock)(id _Nullable route, NSError *_Nullable error);

@interface ADLbsSearchManager : NSObject

+ (void)reGeoWithCoordinate:(CLLocationCoordinate2D)coor
                        completion:(ADReGeoSearchResultBlock)reGeoResultBlock;

+ (void)searchLocationsWithKeyword:(NSString *)keyword
                              city:(NSString *)city
                        completion:(ADLocationSearchResultBlock)searchResultBlock;

+ (void)searchRouteWithType:(ADRouteSearchType)routeSearchType
                     origin:(CLLocationCoordinate2D)origin
                destination:(CLLocationCoordinate2D)destination
                   complete:(ADRouteSearchResultBlock)searchResultBlock;
@end

NS_ASSUME_NONNULL_END
